<?php
require_once('Simq.php');

echo "队列长度: <br/>\n";
$n = Simq::len("demo");
echo "长度: {$n}<br/><br/>\n";

$info = 'php info at ' . date('Y-m-d H:i:s');
echo "推送信息: {$info}<br/>\n";
$n = Simq::put("demo", $info);
echo '操作返回: ', var_dump($n), "<br/><br/>\n";

echo "队列长度: <br/>\n";
$n = Simq::len("demo");
echo "长度: {$n}<br/><br/>\n";

echo "获取信息: <br/>\n";
$msg = Simq::get("demo");
echo "返回信息: {$msg}<br/><br/>\n";

echo "队列长度: <br/>\n";
$n = Simq::len("demo");
echo "长度: {$n}<br/><br/>\n";
